Skip to content

refactor(agent): factor CLAUDE.md from 3,291→60 lines with prompts submodule (RFC-001)#9

Open
CodeMonkeyCybersecurity wants to merge 2 commits intomainfrom
refactor/7-claude-md-factoring
Open

refactor(agent): factor CLAUDE.md from 3,291→60 lines with prompts submodule (RFC-001)#9
CodeMonkeyCybersecurity wants to merge 2 commits intomainfrom
refactor/7-claude-md-factoring

Conversation

@CodeMonkeyCybersecurity
Copy link
Owner

Summary

  • CLAUDE.md: 3,291 → 60 lines (−98%)
  • Added third_party/prompts git submodule (cybermonkey/prompts)
  • Governance contracts replaced with @third_party/prompts/ @import references

Changes

File Change
claude.md Replaced 3,291-line monolith with 60-line thin proxy
.gitmodules Added third_party/prompts submodule
third_party/prompts New submodule at ssh://git@vhost7:9001/cybermonkey/prompts.git

Why

Per RFC-001: governance contracts were copy-pasted inline. This converts hera to a thin proxy that @imports governance from the upstream cybermonkey/prompts submodule. Only hera-specific context remains: OAuth2/OIDC security testing scope, commands, and the adversarial approach note.

Test plan

  • npm test passes (hera unit tests — Vitest)
  • git submodule status third_party/prompts shows current SHA (no + prefix)
  • Spot-check contract imports resolve: @third_party/prompts/GOVERNANCE-SUMMARY.md, @third_party/prompts/TESTING-JS.md
  • Confirm ANTI-PATTERNS import is intentionally absent (blocked on cybermonkey/prompts#562; follow-up tracked in hera#8)

References

🤖 Generated with Claude Code

…module

Replace monolithic 3,291-line CLAUDE.md with a 60-line thin proxy that:
- Retains essential commands and hera-specific identity
- Delegates governance contracts to @third_party/prompts/ @imports
- Adds cybermonkey/prompts as third_party/prompts submodule

Closes #7

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f65bab8f4d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -0,0 +1,3 @@
[submodule "third_party/prompts"]
path = third_party/prompts
url = ssh://git@vhost7:9001/cybermonkey/prompts.git

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use reachable submodule URL for prompts dependency

Pointing the new third_party/prompts submodule at ssh://git@vhost7:9001/... makes fresh checkouts fail outside the internal vhost7 network (repro: git submodule update --init --recursive errors with Could not resolve hostname vhost7), which leaves claude.md's imported governance contracts unavailable. This turns the refactor into a broken default for contributors/CI environments that do not have that private host and SSH setup, so the submodule URL should be changed to an accessible remote (or a mirrored public/relative URL).

Useful? React with 👍 / 👎.

…import

- Update third_party/prompts to latest main (refs cybermonkey/prompts#566)
- Add @third_party/prompts/ANTI-PATTERNS.md to Governance section in CLAUDE.md
- Closes #8

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(agent): factor CLAUDE.md from 3291→62 lines with path-scoped rules

1 participant